<%@page contentType="text/html; charset=utf-8"%>
<%@ page import="monster.comm.util.SysConstant"%>
<%@page import="monster.comm.util.ReturnConstant"%>

<%
//1.工程路径

String path = request.getContextPath();
//2.session校验
String uri=monster.comm.util.Tool.getBackURI(request);
String s_staff_name = session.getAttribute("STAFF_NAME");
String s_staff_sn = session.getAttribute("STAFF_SN");

if(s_staff_name==null){
	request.setAttribute("xt_back_uri", uri);
	RequestDispatcher disp=request.getRequestDispatcher(path+"/index.jsp");
	disp.forward(request,response);
	return;
}
//3.清除缓存
      response.setHeader("Pragma","No-Cache");
      response.setHeader("Cache-Control","No-Cache");
      response.setDateHeader("Expires", 0);
//4.ie6 png背景处理
%>
<!--[if lte IE 6]>
<script src="<%=path%>/comm/js/DD_belatedPNG_0.0.8a.js" type="text/javascript"></script> 
   <script type="text/javascript">  
         DD_belatedPNG.fix('div, ul, img, li, input , a'); 
   </script>
<![endif]--> 
<script src="<%=path %>/comm/js/jquery-1.7.1.min.js"></script>

 <script type="text/javascript">  
 var err_after=" 请联系学舟客服人员，电话:1111111";
 /** 
 * 定义返回常量 应该同java常量monster.dsch.comm.ReturnConstant保持一直
  */
 var ReturnConstant = {
     IS_NOT_LOGIN:"<%=ReturnConstant.IS_NOT_LOGIN%>",//未登录
     IS_DEAL_OK:"<%=ReturnConstant.IS_DEAL_OK%>",//操作成功
     IS_DEAL_FAIL:"<%=ReturnConstant.IS_DEAL_FAIL%>",//操作失败
     IS_PARAMS_ERR:"<%=ReturnConstant.IS_PARAMS_ERR%>",//参数错误
     IS_ERR:"<%=ReturnConstant.IS_ERR%>",//程序异常
     IS_BEFOR_ERR:"<%=ReturnConstant.IS_BEFOR_ERR%>"//处理时前提条件异常
 }
      /** 
       4.失效后弹出登录框
       **/
         function login_open(){
          var url="<%=path%>/login/openlogin.jsp";
          art.dialog.open(url, {title: '失效登录',width:'500px',height:'300px'});
         
         }
         //关闭退出页面
         function login_out(){
         
         art.dialog.confirm("是否退出系统?",
         	function(){
         		$.post(
         			"<%=path%>/login/loginout.jsp", 
         			{  },
					function(data, textStatus){
			          window.close();
						
					}
					, "json");
         	},
        	 function(){}
         	)
         }
         
 /**
 获取数据字典的中文值
dict_code：数据字典编码，如ZD001
option_id:数据字典的值 如：01
 **/        
function dict(dict_code,option_id){
   var ret="";
   if(option_id=="")
      return "";
   try{
   ret=xt_dict[dict_code][option_id];
   }
   catch(err){
    ret="数据字典为"+dict_code+",值为"+option_id+"的对应字典找不到";
   }
   if(!ret)
   ret="数据字典为"+dict_code+",值为"+option_id+"的对应字典找不到";
   return ret;
}
 </script>
